<?php

class order_taxes extends a_dynamic_prop {

    public function get_property_name(){
        return $this->_prefix()."grouped_taxes";
    }

    public function run( i_base_model $caller){         
        if($caller->id!==NULL){
            $tax_service = new service_l_tax();
            //logger::i()->error($tax_service->get_order_tax($caller->id));
            return $tax_service->get_order_tax($caller->id);            
        }else{
            return NULL;
        }
    }

    public function for_model(){
        return "order_m_order";
    }

    public function run_once(){
        return FALSE;
    }
}
?>